package com;



import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan({"com.dao"})
public class SpringMybatisApplication {

    public static void main(String[] args) {

        SpringApplication.run(SpringMybatisApplication.class, args);

        /*ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        CustomerDao customerDao=applicationContext.getBean(CustomerDao.class);
        List<Customer> list=customerDao.query();
        System.out.println(list);*/

        /*ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        CustomerServiceImpl service =applicationContext.getBean(CustomerServiceImpl.class);
        service.setDao(applicationContext.getBean(CustomerDao.class));
        CustomerDao dao= service.getDao();
        Student student=new Student();
        student.setUsername("小芳");
        student.setAge("11");
        Customer customer=new Customer();
        customer.setUsername("小妞");
        customer.setJobs("教授");
        customer.setPhone("123134214");
        dao.add(customer,student);

        Map map=new HashMap();
        map.put(0,customer);
        map.put(1,student);
        service.add(map);*/

       /* ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        StudentDao studentDao=applicationContext.getBean(StudentDao.class);
        Student student=new Student();
        student.setUsername("小芳");
        student.setAge("11");
        studentDao.add(student);
        System.out.println(studentDao.query());*/







    }
}
